# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=html2text
pkgver=2.1.1
pkgrel=0
pkgdesc="html2text is a command line utility, written in C++, that converts HTML documents into plain text."
url="http://www.mbayer.de/html2text/"
arch="all !s390x" # segfaults on s390x
license="GPL"
makedepends="bison bash"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/grobian/html2text/archive/v$pkgver.tar.gz"

build() {
	./configure --prefix=/usr
	make
}

check() {
	make check
}

package() {
	install -Dm755 "html2text" "$pkgdir"/usr/bin/html2text
	install -Dm644 "html2text.1" "$pkgdir"/usr/share/man/man1/html2text.1
	install -Dm644 "html2textrc.5" "$pkgdir"/usr/share/man/man5/html2textrc.5
}

sha512sums="
e7fbd795b06895d866e3379c343860dc8816d5069b476cd13abeb066ba1ad222050863c1d52c6b2c05d426a17af7b427913341c8205964b21f18a3d26c3528c4  html2text-2.1.1.tar.gz
"
